home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake.doc < prev    next >
Encoding:
Text File  |  1996-11-16  |  7.7 KB  |  176 lines

  1. =============================================================================
  2.                                 ICMAKE
  3.                   the Intelligent C-like MAKEr, or
  4.                         the ICce MAKE utility
  5.  
  6.             Copyright (c) Frank B. Brokken and Karel Kubat
  7.                  frank@icce.rug.nl, karel@icce.rug.nl
  8.  
  9.            ICCE, State University of Groningen, Netherlands
  10.        
  11.          This document is part of distribution 6.17 of ICMAKE
  12. =============================================================================
  13.  
  14.  
  15. Introduction
  16. ------------
  17.  
  18.         Icmake is a hybrid between a 'make' utility and a 'shell script'
  19. language.  Originally, it was concocted to provide a useful tool for
  20. automatic program maintenance and system administrative tasks on MS-DOS
  21. platforms.  As we learned to appreciate its flexibility, Icmake was
  22. eventually ported to Unix platforms (SCO and Linux). By now Icmake also runs
  23. on a HP-Unix platform.
  24.  
  25.         To give an impression of "what Icmake does", take a look at the
  26. following makefile. It is used for automatic program maintenance, where it
  27. is assumed that in some directory all files with the extension ".c" (C
  28. source files) constitute a program "myprog". The automatic maintenance makes
  29. sure that, once Icmake is invoked, C source files which are more recent
  30. (newer) than a library file "libmyprog.a" are recompiled and placed in the
  31. library. A new program is then made and installed in a directory
  32. "/home/user/bin".
  33.  
  34. void main ()
  35. {
  36.     list
  37.         cfiles;                                 // list of .c files
  38.     int
  39.         i;                                      // counter variable
  40.     string
  41.         sourcefile;                             // string with name of
  42.                                                 // 1 source file
  43.  
  44.     cfiles = makelist ("*.c", younger,          // cfiles is now a list of
  45.         "libmyprog.a");                         // all files to recompile
  46.  
  47.     if (cfiles)                                 // if there are any files..
  48.         for (i = 0; i < sizeof (cfiles),        // recompile them
  49.              i++)
  50.         {
  51.             sourcefile = element (i, cfiles);   // get the name from the list
  52.             exec ("gcc", "-c -Wall", sourcefile); // recompile
  53.         }
  54.  
  55.     if (makelist ("*.o"))                       // any "*.o" files here?
  56.     {
  57.         exec ("ar", "rvs", "libmyprog.a", "*.o");  // add to library
  58.         exec ("rm", "*.o");                        // remove them
  59.         exec ("gcc", "-o myprog", "libmyprog.a");  // re-link program
  60.         exec ("mv", "myprog", "/home/user/bin");   // and install in bin dir
  61.     }
  62. }
  63.  
  64.         The source files for Icmake look remarkably like C sourcefiles. The
  65. resemblance is so close that this cannot be pure chance!  Yes, we have
  66. implemented Icmake to be a language with a syntax which largely overlaps C.
  67. Since we know how to program in C, we decided that we didn't want to learn
  68. some new macro language.  The Icmake language is a "subset" of C in the
  69. sence that not all operators or functions of C are implemented (but a good
  70. deal are, e.g., gets(), getch(), printf(), etc.).  The Icmake language has
  71. its own extensions to make it a handy language for the purpose of
  72. maintenance: e.g., the operator "younger" compares two files in respect to
  73. their date of last modification, a type "list" is defined to hold several
  74. strings.
  75.  
  76.         The usage of Icmake is not restricted to program maintenance. The
  77. setup, which allows for functions, arguments, local or global variables, the
  78. calling of external programs, etc.  makes Icmake also extremely suitable as
  79. a shell script language.  E.g., it is easy to accomplish to let Icmake
  80. figure out which files need to be backupped since the last backup date and
  81. to start a process to do so, to send mail about it etc.
  82.  
  83.         This guide provides a short description how Icmake can be ported to
  84. new platforms.  The documentation for the usage of Icmake, including a
  85. description of the grammar and of all built-in functions, comes with the
  86. distribution files.
  87.  
  88.  
  89. Installing Icmake
  90. -----------------
  91.  
  92. The icmake-X.YY.tgz contains all source files and installation information
  93. if you want to install icmake from scratch. You *need* this file if you
  94. want to install icmake on systems not running Linux or Ms-DOS.
  95.  
  96. The icmake-X.YY.bin.tgz contains linux and ms-dos executables. If you only
  97. want to use the icmake programs, you can get this file, unpack it and start
  98. using icmake.
  99.  
  100. See the file INSTALL for details. INSTALL is in icmake-X.YY.tgz, 
  101. containing all other files necessary for installing icmake. 
  102.  
  103. To unpack the archives use (GNU-tar 1.11.2):
  104.         
  105.             tar xzvf icmake-X.YY.tgz
  106. and/or:        
  107.             tar xzvf icmake-X.YY.bin.tgz
  108.  
  109. which unpacks into an 'icmake' subdirectory below the current subdirectory.
  110. Also, separate gzip and tar steps could be used, as in:
  111.  
  112.                 gzip -c -d icmake-X.YY.tgz | tar xvf -
  113. and/or:        
  114.                 gzip -c -d icmake-X.YY.bin.tgz | tar xvf -
  115.         
  116. The Documentation
  117. -----------------
  118.  
  119.         Icmake is documented in a Postscript file, "icmake.ps", located in
  120. the directory "doc".  This file is generated from a .dvi file using dvips,
  121. and can be processed with GhostScript.  Note that the file is generated for
  122. a printer resolution of 300 dpi, which suits a LaserJet family printer.  If
  123. your site lacks the means to print this file, you can mail us at the address
  124. below to obtain a printed copy of the documentation.  (However, we will
  125. charge you a small amount to cover our costs).
  126.  
  127.         The directory "doc" furthermore contains the file "icmake.1". This
  128. is a crude "man" page for Unix systems.  You can install it by copying it to
  129. a directory which contains formatted manual pages.  To use this feature,
  130. your "man" command must be able to show an already-formatted manual entry.
  131. E.g., on Linux systems you can copy this file to "/usr/man/cat1".  Typing
  132. "man icmake" will then show the information.  Some man systems also support
  133. compressed manual pages.  On these systems you may achieve a lower disk
  134. usage by compressing the file "icmake.1" to "icmake.1.Z", using the Unix
  135. program "compress".
  136.  
  137.         A few makefiles are provided as examples in the directory
  138. "examples". You may wish to look at these to see how makefiles can be
  139. organized.
  140.  
  141. Some Legal Stuff
  142. ----------------
  143.  
  144.         You don't have to pay us for Icmake. This means that no fee is
  145. charged for it by us.  As with everything that's free, there's no pay but
  146. also *absolutely no warranty*.  Furthermore, you are allowed (and
  147. encouraged) to distribute Icmake, provided that you include this information
  148. with each distribution.  It is strongly suggested that you do *not* charge
  149. money for the distribution of Icmake (possibly not even the $5 for
  150. shipping).
  151.  
  152.         The source files and the documentation for Icmake are copyrighted by
  153. us.  The reason for this is (a) that we'd like to have always the last
  154. version of Icmake, and (b) that we'd like to have the last word in all
  155. modifications.  If you have requests (or even better, "working code" to
  156. include in Icmake) please mail us and we'll gladly oblige when we find the
  157. time.
  158.  
  159.  
  160. Requests, Bug Reports, etc.
  161. ---------------------------
  162.  
  163.         We'd very much appreciate it if you'd let us know if you encounter any 
  164. bugs. Also, if you have requests or comments about the programs or the 
  165. documentation, mail us. We can be reached at:
  166.  
  167.                 Frank Brokken                   Karel Kubat
  168. e-mail:         F.B.Brokken@icce.rug.nl         K.Kubat@icce.rug.nl
  169. phone:          (+31) 50 63 36 88               (+31) 50 63 36 47
  170. address:        Westerhaven 16                  Westerhaven 16
  171.                 Groningen                       Groningen
  172.                 Netherlands                     Netherlands
  173.  
  174. -----------------------------------------------------------------------------
  175. (end of icmake.doc)
  176.